package com.huwaiwai.kafka.demo02.partitioner;

import kafka.producer.Partitioner;
import kafka.utils.VerifiableProperties;

/**
 * Created by Administrator on 2017/5/1.
 */
public class MyPartitioner implements Partitioner {

    public MyPartitioner(VerifiableProperties props) {

    }

    @Override
    public int partition(Object o, int i) {
        return Integer.valueOf(String.valueOf(o)) % i;
    }
}
